home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Prog / D-G / Generic MPW Tool.sit / GenericTool.c next >
MacBinary  |  1991-11-10  |  2.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: GenericTool.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Nov 10 13:21:56 1991, modified Sun Nov 10 13:21:56 1991, creator 'MPS ', type ASCII, 1438 bytes "GenericTool.c" , at 0x61e 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 47 65 6e 65 72 69 | 63 54 6f 6f 6c 2e 63 00 |..Generi|cTool.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 05 9e 00 | 00 01 ac a5 43 29 44 a5 |........|....C)D.|
|00000060| 43 29 44 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |C)D.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1a d5 00 00 |........|........|
|00000080| 2f 2a 0d 09 47 65 6e 65 | 72 69 63 54 6f 6f 6c 2e |/*..Gene|ricTool.|
|00000090| 63 0d 09 44 6f 75 67 20 | 57 79 61 74 74 2c 20 4d |c..Doug |Wyatt, M|
|000000a0| 61 79 20 31 39 39 31 0d | 09 0d 09 46 72 65 65 77 |ay 1991.|...Freew|
|000000b0| 61 72 65 2e 0d 09 0d 09 | 53 6f 75 72 63 65 20 66 |are.....|Source f|
|000000c0| 6f 72 20 74 69 6e 79 20 | 4d 50 57 20 74 6f 6f 6c |or tiny |MPW tool|
|000000d0| 20 77 68 6f 73 65 20 65 | 6e 74 69 72 65 20 70 75 | whose e|ntire pu|
|000000e0| 72 70 6f 73 65 20 69 73 | 20 74 6f 20 6c 6f 61 64 |rpose is| to load|
|000000f0| 20 74 68 65 20 72 65 73 | 74 0d 09 6f 66 20 69 74 | the res|t..of it|
|00000100| 73 65 6c 66 20 66 72 6f | 6d 20 61 20 63 6f 64 65 |self fro|m a code|
|00000110| 20 72 65 73 6f 75 72 63 | 65 2c 20 50 52 4f 43 20 | resourc|e, PROC |
|00000120| 39 38 31 2c 20 77 68 69 | 63 68 20 69 73 20 28 74 |981, whi|ch is (t|
|00000130| 79 70 69 63 61 6c 6c 79 | 29 0d 09 77 72 69 74 74 |ypically|)..writt|
|00000140| 65 6e 20 69 6e 20 54 48 | 49 4e 4b 20 43 2e 0d 09 |en in TH|INK C...|
|00000150| 0d 09 43 6f 6d 70 69 6c | 65 20 61 6e 64 20 6c 69 |..Compil|e and li|
|00000160| 6e 6b 20 74 68 69 73 20 | 66 69 6c 65 20 69 6e 20 |nk this |file in |
|00000170| 4d 50 57 20 61 73 20 66 | 6f 6c 6c 6f 77 73 20 28 |MPW as f|ollows (|
|00000180| 74 68 65 20 74 6f 6f 6c | 20 69 73 20 69 6e 63 6c |the tool| is incl|
|00000190| 75 64 65 64 0d 09 69 6e | 20 74 68 69 73 20 73 68 |uded..in| this sh|
|000001a0| 61 72 65 77 61 72 65 20 | 72 65 6c 65 61 73 65 29 |areware |release)|
|000001b0| 3a 0d 0d 09 09 43 20 47 | 65 6e 65 72 69 63 54 6f |:....C G|enericTo|
|000001c0| 6f 6c 2e 63 0d 09 09 4c | 69 6e 6b 20 2d 77 20 2d |ol.c...L|ink -w -|
|000001d0| 74 20 4d 50 53 54 20 2d | 63 20 27 4d 50 53 20 27 |t MPST -|c 'MPS '|
|000001e0| 20 b6 0d 09 09 09 47 65 | 6e 65 72 69 63 54 6f 6f | .....Ge|nericToo|
|000001f0| 6c 2e 63 2e 6f 20 b6 0d | 09 09 09 22 7b 43 4c 69 |l.c.o ..|..."{CLi|
|00000200| 62 72 61 72 69 65 73 7d | 22 43 52 75 6e 74 69 6d |braries}|"CRuntim|
|00000210| 65 2e 6f 20 b6 0d 09 09 | 09 22 7b 4c 69 62 72 61 |e.o ....|."{Libra|
|00000220| 72 69 65 73 7d 22 54 6f | 6f 6c 4c 69 62 73 2e 6f |ries}"To|olLibs.o|
|00000230| 20 b6 0d 09 09 09 22 7b | 43 4c 69 62 72 61 72 69 | ....."{|CLibrari|
|00000240| 65 73 7d 22 53 74 64 43 | 4c 69 62 2e 6f 20 b6 0d |es}"StdC|Lib.o ..|
|00000250| 09 09 09 22 7b 43 4c 69 | 62 72 61 72 69 65 73 7d |..."{CLi|braries}|
|00000260| 22 43 49 6e 74 65 72 66 | 61 63 65 2e 6f 20 b6 0d |"CInterf|ace.o ..|
|00000270| 09 09 09 22 7b 43 4c 69 | 62 72 61 72 69 65 73 7d |..."{CLi|braries}|
|00000280| 22 43 53 41 4e 45 4c 69 | 62 2e 6f 20 b6 0d 09 09 |"CSANELi|b.o ....|
|00000290| 09 2d 6f 20 47 65 6e 65 | 72 69 63 54 6f 6f 6c 0d |.-o Gene|ricTool.|
|000002a0| 0d 09 4d 61 6b 65 20 61 | 20 63 6f 70 79 20 6f 66 |..Make a| copy of|
|000002b0| 20 47 65 6e 65 72 69 63 | 20 54 6f 6f 6c 20 61 6e | Generic| Tool an|
|000002c0| 64 20 6e 61 6d 65 20 69 | 74 20 77 68 61 74 65 76 |d name i|t whatev|
|000002d0| 65 72 20 79 6f 75 20 6c | 69 6b 65 2e 20 20 0d 09 |er you l|ike. ..|
|000002e0| 0d 09 50 52 4f 43 20 39 | 38 31 20 73 68 6f 75 6c |..PROC 9|81 shoul|
|000002f0| 64 20 62 65 20 62 75 69 | 6c 74 20 69 6e 20 54 48 |d be bui|lt in TH|
|00000300| 49 4e 4b 20 43 20 61 73 | 20 61 20 63 6f 64 65 20 |INK C as| a code |
|00000310| 72 65 73 6f 75 72 63 65 | 2e 20 20 4d 65 72 67 65 |resource|. Merge|
|00000320| 20 69 74 0d 09 69 6e 74 | 6f 20 61 20 63 6f 70 79 | it..int|o a copy|
|00000330| 20 6f 66 20 47 65 6e 65 | 72 69 63 20 54 6f 6f 6c | of Gene|ric Tool|
|00000340| 2e 20 20 49 74 73 20 65 | 6e 74 72 79 20 70 6f 69 |. Its e|ntry poi|
|00000350| 6e 74 20 6d 75 73 74 20 | 62 65 20 64 65 63 6c 61 |nt must |be decla|
|00000360| 72 65 64 3a 0d 0d 09 09 | 4f 53 45 72 72 20 6d 61 |red:....|OSErr ma|
|00000370| 69 6e 28 6c 6f 6e 67 20 | 61 72 67 63 2c 20 63 68 |in(long |argc, ch|
|00000380| 61 72 20 2a 61 72 67 76 | 5b 5d 2c 20 56 6f 69 64 |ar *argv|[], Void|
|00000390| 46 75 6e 63 20 70 50 72 | 69 6e 74 66 2c 20 0d 09 |Func pPr|intf, ..|
|000003a0| 09 09 56 6f 69 64 46 75 | 6e 63 20 70 46 70 72 69 |..VoidFu|nc pFpri|
|000003b0| 6e 74 66 2c 20 6c 6f 6e | 67 20 73 74 64 65 72 72 |ntf, lon|g stderr|
|000003c0| 29 3b 0d 2a 2f 0d 09 0d | 0d 0d 23 69 6e 63 6c 75 |);.*/...|..#inclu|
|000003d0| 64 65 09 3c 74 79 70 65 | 73 2e 68 3e 0d 23 69 6e |de.<type|s.h>.#in|
|000003e0| 63 6c 75 64 65 09 3c 73 | 74 64 69 6f 2e 68 3e 0d |clude.<s|tdio.h>.|
|000003f0| 23 69 6e 63 6c 75 64 65 | 09 3c 45 72 72 4d 67 72 |#include|.<ErrMgr|
|00000400| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 45 72 |.h>.#inc|lude.<Er|
|00000410| 72 6f 72 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |rors.h>.|#include|
|00000420| 09 3c 43 75 72 73 6f 72 | 43 74 6c 2e 68 3e 0d 23 |.<Cursor|Ctl.h>.#|
|00000430| 69 6e 63 6c 75 64 65 09 | 3c 46 69 6c 65 73 2e 68 |include.|<Files.h|
|00000440| 3e 0d 23 69 6e 63 6c 75 | 64 65 09 3c 52 65 73 6f |>.#inclu|de.<Reso|
|00000450| 75 72 63 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |urces.h>|.#includ|
|00000460| 65 09 3c 53 74 72 69 6e | 67 73 2e 68 3e 0d 0d 65 |e.<Strin|gs.h>..e|
|00000470| 78 74 65 72 6e 20 70 72 | 69 6e 74 66 28 29 2c 20 |xtern pr|intf(), |
|00000480| 66 70 72 69 6e 74 66 28 | 29 3b 0d 0d 0d 6c 6f 6e |fprintf(|);...lon|
|00000490| 67 20 6d 61 69 6e 28 61 | 72 67 63 2c 61 72 67 76 |g main(a|rgc,argv|
|000004a0| 29 0d 09 69 6e 74 09 09 | 61 72 67 63 3b 0d 09 63 |)..int..|argc;..c|
|000004b0| 68 61 72 09 2a 61 72 67 | 76 5b 5d 3b 0d 7b 0d 09 |har.*arg|v[];.{..|
|000004c0| 6c 6f 6e 67 09 09 09 73 | 74 61 74 75 73 3b 09 2f |long...s|tatus;./|
|000004d0| 2a 20 72 65 73 75 6c 74 | 20 63 6f 64 65 20 2a 2f |* result| code */|
|000004e0| 0d 09 48 61 6e 64 6c 65 | 20 70 72 6f 63 48 3b 0d |..Handle| procH;.|
|000004f0| 0d 09 49 6e 69 74 43 75 | 72 73 6f 72 43 74 6c 28 |..InitCu|rsorCtl(|
|00000500| 6e 69 6c 29 3b 0d 09 70 | 72 6f 63 48 20 3d 20 47 |nil);..p|rocH = G|
|00000510| 65 74 52 65 73 6f 75 72 | 63 65 28 27 50 52 4f 43 |etResour|ce('PROC|
|00000520| 27 2c 39 38 31 29 3b 0d | 09 69 66 20 28 70 72 6f |',981);.|.if (pro|
|00000530| 63 48 29 20 7b 0d 09 09 | 4d 6f 76 65 48 48 69 28 |cH) {...|MoveHHi(|
|00000540| 70 72 6f 63 48 29 3b 0d | 09 09 48 4c 6f 63 6b 28 |procH);.|..HLock(|
|00000550| 70 72 6f 63 48 29 3b 0d | 09 09 73 74 61 74 75 73 |procH);.|..status|
|00000560| 20 3d 20 28 2a 20 28 73 | 68 6f 72 74 20 28 2a 29 | = (* (s|hort (*)|
|00000570| 28 29 29 2a 70 72 6f 63 | 48 29 28 28 6c 6f 6e 67 |())*proc|H)((long|
|00000580| 29 61 72 67 63 2c 20 61 | 72 67 76 2c 20 70 72 69 |)argc, a|rgv, pri|
|00000590| 6e 74 66 2c 20 66 70 72 | 69 6e 74 66 2c 20 73 74 |ntf, fpr|intf, st|
|000005a0| 64 65 72 72 29 3b 0d 09 | 09 52 65 6c 65 61 73 65 |derr);..|.Release|
|000005b0| 52 65 73 6f 75 72 63 65 | 28 70 72 6f 63 48 29 3b |Resource|(procH);|
|000005c0| 0d 09 7d 20 65 6c 73 65 | 20 7b 0d 09 09 70 72 69 |..} else| {...pri|
|000005d0| 6e 74 66 28 22 25 73 20 | 2d 20 50 52 4f 43 20 39 |ntf("%s |- PROC 9|
|000005e0| 38 31 20 6e 6f 74 20 66 | 6f 75 6e 64 22 2c 20 61 |81 not f|ound", a|
|000005f0| 72 67 76 5b 30 5d 29 3b | 0d 09 09 73 74 61 74 75 |rgv[0]);|...statu|
|00000600| 73 20 3d 20 31 3b 0d 09 | 7d 0d 09 0d 09 72 65 74 |s = 1;..|}....ret|
|00000610| 75 72 6e 20 73 74 61 74 | 75 73 3b 0d 7d 0d 00 00 |urn stat|us;.}...|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000690| 00 00 0b 14 0c 28 4f 4d | 53 53 65 74 75 70 2e b9 |.....(OM|SSetup..|
|000006a0| 29 74 01 00 00 00 00 01 | 00 00 0b 38 a3 d5 04 97 |)t......|...8....|
|000006b0| 0d 47 65 6e 65 72 69 63 | 54 6f 6f 6c 2e 63 02 00 |.Generic|Tool.c..|
|000006c0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000006d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 a9 80 19 01 00 00 | 00 00 00 00 01 ac 01 00 |........|........|
|00000700| 00 00 00 01 00 00 0b 3a | a3 d5 04 a4 a3 d7 9e c4 |.......:|........|
|00000710| 00 00 00 00 00 52 00 18 | 01 0e 01 ac 01 00 01 18 |.....R..|........|
|00000720| 00 00 02 40 ff f8 ff f0 | 00 00 00 00 00 00 00 00 |...@....|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 14 00 00 00 | 0b 14 0e 41 62 6f 75 74 |........|...About|
|00000750| 20 42 6f 78 20 49 64 65 | 61 78 01 00 00 00 00 01 | Box Ide|ax......|
|00000760| 00 00 0b 3c a3 a9 98 37 | a3 a9 98 3e 00 00 00 00 |...<...7|...>....|
|00000770| 00 3e 00 0e 00 fa 01 a2 | 01 00 00 64 00 c0 01 00 |.>......|...d....|
|00000780| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 73 74 64 |...H..Mo|naco.std|
|00000790| 69 6f 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 09 3c |io.h>.#i|nclude.<|
|000007a0| 45 72 72 4d 67 72 00 06 | 00 04 00 2a 00 03 01 14 |ErrMgr..|...*....|
|000007b0| 01 fc 00 2a 00 03 01 14 | 01 fc a4 60 62 17 00 00 |...*....|...`b...|
|000007c0| 01 af 00 00 01 af 00 00 | 00 c3 01 00 00 00 00 1e |........|........|
|000007d0| 00 2a 00 03 01 14 01 fc | 00 2a 00 03 01 14 01 fc |.*......|.*......|
|000007e0| 00 00 00 c3 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 2d |.....n..|.n...>.-|
|00000800| bf 5c 06 9e 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.\......|.>..MPSR|
|00000810| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 03 f0 ff ff 00 00 00 4c | 00 2f a7 54 00 00 00 00 |.......L|./.T....|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+